package com.example.sams.utils;

public class LoginUser {


    //创建线程本地变量
    public static final ThreadLocal<String> threadLocal = new ThreadLocal<>();

    //set值
    public static void setCurrentId(String id){
        threadLocal.set(id);
    }

    //取值
    public static String getCurrentId(){
        return threadLocal.get();
    }

    //删除
    public static void removeCurrentId() {
        threadLocal.remove();
    }

}

